package cn.edu.neu.service.impl;

import cn.edu.neu.dao.UserDao;
import cn.edu.neu.model.User;
import cn.edu.neu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;

    @Override
    public User getUserById(Integer id) {
        return userDao.selectByPrimaryKey(id);
    }

    public User getUserByUsernameAndPassword(String username, String password) {
        return userDao.getUserByUsernameAndPassword(username, password);
    }

    @Override
    public void updateUserStatus(int userId, int status) {
        userDao.updateUserStatus(userId, status);
    }

}




